-- GENERATED SPELL FOR [Hatecrest Sorceress] --


function spell0_5336(pUnit, Event) --@Blizzard,n/a--
pUnit:FullCastSpellOnTarget(10185,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5336', 8000, 1)
end

function spell1_5336(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20822,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5336', 7000, 1)
end

function Sorts_5336(pUnit, Event)
local choix_sorts_5336 = math.random(0, 1)
if choix_sorts_5336 == 0 then
pUnit:RegisterEvent('spell0_5336', 1, 1)
end
if choix_sorts_5336 == 1 then
pUnit:RegisterEvent('spell1_5336', 1, 1)
end
end

function mob5336_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5336', math.random(1500, 3000), 1)
end

function mob5336_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5336_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5336_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5336, 1, 'mob5336_Action')
RegisterUnitEvent(5336, 2, 'mob5336_Leave')
RegisterUnitEvent(5336, 3, 'mob5336_Kill')
RegisterUnitEvent(5336, 4, 'mob5336_Die')
